<?php
/**
* @version    $Id: helper.php 2009-09-17 20:14:40Z diana $
* @package    Dynamic XML Sitemap
* @copyright  Copyright (C) 2009-2010 - Diana Scherff (http://www.dianascherff.com). All rights reserved.
* @license    GNU/GPL
*/

// no direct access
defined('_JEXEC') or die('Restricted access');
$xml ='<?xml version="1.0" encoding="UTF-8"?>';
$xml.= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1"
        xmlns:video="http://www.sitemaps.org/schemas/sitemap-video/1.1">';
$xml .= $strXMLSitemap;
$xml .= "</urlset>";
file_put_contents(JPATH_ROOT.DS.'sitemap.xml',$xml);
echo $strXMLSitemap;